<?php
$ip = isset($_SERVER['SERVER_ADDR'])?$_SERVER['SERVER_ADDR']:'127.0.0.1';

$hostname=isset($_SERVER['HOSTNAME'])?$_SERVER['HOSTNAME']:'yaojinjin1';

if($ip == '172.18.120.185'){

    return [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=localhost;dbname=weixiu_shop',
        'username' => 'root',
        'password' => 'admin123',
        'charset' => 'utf8',
        'tablePrefix' => 'shop_',
    ];

}else{
    return [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=localhost;dbname=wx_shop',
        'username' => 'root',
        'password' => '123456',
        'charset' => 'utf8',
        'tablePrefix' => 'shop_',
    ];

}